package net.zjitc.utils;

import java.util.List;

/**
 * Created by Administrator on 2017/10/26.
 */
public class PageBean<E>{

    //前端传进来
    private int currenPage; //第几页
    private int pageSize;//当前页的数据条数

    //计算出来  count/pageSize
    private int pageCount; //一共多少页


    //从数据库里面查出来
    private List<E> pageList; //当前页的数据列表
    private int count;  //数据库中一共多少条数据

    public int getCurrenPage() {
        return currenPage;
    }

    public void setCurrenPage(int currenPage) {
        this.currenPage = currenPage;
    }

    ////计算出来  count/pageSize
    public int getPageCount() {
        int a = count/pageSize;
        pageCount = (count%pageSize == 0)? a:a+1;
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List<E> getPageList() {
        return pageList;
    }

    public void setPageList(List<E> pageList) {
        this.pageList = pageList;
    }

    public int getCount() {

        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }
}
